// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 团队空间用户登录 POST /api/teamSpaceUser/login */
export async function spaceUserLoginUsingPost(options?: { [key: string]: any }) {
  return request<API.Result>('/api/teamSpaceUser/login', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 获取我创建的团队空间列表 GET /api/teamSpaceUser/listMyCreated */
export async function listMyCreatedSpacesUsingGet(options?: { [key: string]: any }) {
  return request<API.Result>('/api/teamSpaceUser/listMyCreated', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 获取我加入的团队空间列表 GET /api/teamSpaceUser/listMyJoined */
export async function listMyJoinedSpacesUsingGet(options?: { [key: string]: any }) {
  return request<API.Result>('/api/teamSpaceUser/listMyJoined', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 获取团队空间信息 GET /api/teamSpaceUser/getTeamSpaceInfo */
export async function getTeamSpaceInfoUsingGet(options?: { [key: string]: any }) {
  return request<API.Result>('/api/teamSpaceUser/getTeamSpaceInfo', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 创建团队空间 POST /api/teamSpaceUser/createTeamSpace */
export async function createTeamSpaceUsingPost(options?: { [key: string]: any }) {
  return request<API.Result>('/api/teamSpaceUser/createTeamSpace', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 加入团队空间 POST /api/teamSpaceUser/joinTeamSpace */
export async function joinTeamSpaceUsingPost(
  params: {
    /** 团队空间ID */
    spaceId: number
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/teamSpaceUser/joinTeamSpace', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 获取团队空间成员列表 GET /api/teamSpaceUser/listMembers */
export async function listTeamSpaceMembersUsingGet(
  params: {
    /** 团队空间ID */
    spaceId: number
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/teamSpaceUser/listMembers', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 移除团队空间成员 POST /api/teamSpaceUser/removeMember */
export async function removeMemberUsingPost(
  params: {
    /** 团队空间ID */
    spaceId: number
    /** 用户ID */
    userId: number
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/teamSpaceUser/removeMember', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 获取团队空间图片列表 GET /api/teamSpaceUser/listPictures */
export async function listTeamSpacePicturesUsingGet(
  params: {
    /** 团队空间ID */
    spaceId: number
    /** 页码 */
    page: number
    /** 每页大小 */
    pageSize: number
    /** 搜索关键词 */
    searchText?: string
  },
  options?: { [key: string]: any }
) {
  return request<API.Result>('/api/teamSpaceUser/listPictures', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 获取空间详细信息 GET /api/teamSpaceUser/detail/${param0} */
export async function getSpaceDetailUsingGet(
  params: {
    /** spaceId */
    spaceId: number
  },
  options?: { [key: string]: any }
) {
  const { spaceId: param0, ...queryParams } = params
  return request<API.Result>(`/api/teamSpaceUser/detail/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}
